<?php

namespace App\Http\Controllers\Home;

use App\Model\Goodlist;
use App\Model\Goods;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class GoodsController extends CommonController
{
    //详情
    public function index($id)
    {
        //商品详情
        $goods = Goods::find($id);
        //规格
        $goodslists = Goodlist::where('goods_id', $id)->get();
        return view('home.goods.index', compact('goods', 'goodslists'));
    }



}
